﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using XCore.Domain.Dto;
using XCore.Domain.Dto.Page;

namespace SaaS.Model.Dto.Auths
{
    /// <summary>
    /// 登录
    /// </summary>
    public class LoginInput
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        [StringLength(16, ErrorMessage = "用户名长度为4~16个字符", MinimumLength = 4)]
        public string UserName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空")]
        [StringLength(32, ErrorMessage = "密码长度为6~32位字符", MinimumLength = 6)]
        public string Password { get; set; }
    }
    /// <summary>
    /// 充值密码
    /// </summary>
    public class ResetPwdInput
    {
        /// <summary>
        /// 会员ID
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 新密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空")]
        [StringLength(32, ErrorMessage = "密码长度为6~32位字符", MinimumLength = 6)]
        public string Password { get; set; }
        /// <summary>
        /// 确认密码
        /// </summary>
        [Required(ErrorMessage = "确认密码不能为空")]
        [StringLength(32, ErrorMessage = "密码长度为6~32位字符", MinimumLength = 6)]
        public string ConfirmPassword { get; set; }
    }

    /// <summary>
    /// 客户日志输入参数
    /// </summary>
    public class PagedByIdAndSearchInput : PagedSearchInput, IEntityDto<int>
    {
        /// <summary>
        /// ID
        /// </summary>
        public int Id { get; set; }
    }
    /// <summary>
    /// 分页带Id查询
    /// </summary>
    public class PagedByIdInput : PagedInput, IEntityDto<int>
    {
        public int Id { get; set; }
    }
    /// <summary>
    /// 带用户Id查询公共参数
    /// </summary>
    public class UserKeyPageInput : PagedInput
    {
        public int UserId { get; set; }
    }
}
